3.103 \(\int f^{a+b x+c x^2} \sin (a+b x+e x^2) \, dx\)

Optimal. Leaf size=213 \[ \frac{i \sqrt{\pi } \exp \left (-(-\log (f)+i) \left (a-\frac{b^2 (-\log (f)+i)}{-4 c \log (f)+4 i e}\right )\right ) \text{Erf}\left (\frac{b (-\log (f)+i)+2 x (-c \log (f)+i e)}{2 \sqrt{-c \log (f)+i e}}\right )}{4 \sqrt{-c \log (f)+i e}}-\frac{i \sqrt{\pi } \exp \left ((\log (f)+i) \left (a-\frac{b^2 (\log (f)+i)}{4 c \log (f)+4 i e}\right )\right ) \text{Erfi}\left (\frac{b (\log (f)+i)+2 x (c \log (f)+i e)}{2 \sqrt{c \log (f)+i e}}\right )}{4 \sqrt{c \log (f)+i e}} \]

[Out]

((I/4)*Sqrt[Pi]*Erf[(b*(I - Log[f]) + 2*x*(I*e - c*Log[f]))/(2*Sqrt[I*e - c*Log[f]])])/(E^((I - Log[f])*(a - (
b^2*(I - Log[f]))/((4*I)*e - 4*c*Log[f])))*Sqrt[I*e - c*Log[f]]) - ((I/4)*E^((I + Log[f])*(a - (b^2*(I + Log[f
]))/((4*I)*e + 4*c*Log[f])))*Sqrt[Pi]*Erfi[(b*(I + Log[f]) + 2*x*(I*e + c*Log[f]))/(2*Sqrt[I*e + c*Log[f]])])/
Sqrt[I*e + c*Log[f]]

________________________________________________________________________________________

Rubi [A]  time = 0.795216, antiderivative size = 213, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {4472, 2287, 2234, 2205, 2204} \[ \frac{i \sqrt{\pi } \exp \left (-(-\log (f)+i) \left (a-\frac{b^2 (-\log (f)+i)}{-4 c \log (f)+4 i e}\right )\right ) \text{Erf}\left (\frac{b (-\log (f)+i)+2 x (-c \log (f)+i e)}{2 \sqrt{-c \log (f)+i e}}\right )}{4 \sqrt{-c \log (f)+i e}}-\frac{i \sqrt{\pi } \exp \left ((\log (f)+i) \left (a-\frac{b^2 (\log (f)+i)}{4 c \log (f)+4 i e}\right )\right ) \text{Erfi}\left (\frac{b (\log (f)+i)+2 x (c \log (f)+i e)}{2 \sqrt{c \log (f)+i e}}\right )}{4 \sqrt{c \log (f)+i e}} \]

Antiderivative was successfully verified.

[In]

Int[f^(a + b*x + c*x^2)*Sin[a + b*x + e*x^2],x]

[Out]

((I/4)*Sqrt[Pi]*Erf[(b*(I - Log[f]) + 2*x*(I*e - c*Log[f]))/(2*Sqrt[I*e - c*Log[f]])])/(E^((I - Log[f])*(a - (
b^2*(I - Log[f]))/((4*I)*e - 4*c*Log[f])))*Sqrt[I*e - c*Log[f]]) - ((I/4)*E^((I + Log[f])*(a - (b^2*(I + Log[f
]))/((4*I)*e + 4*c*Log[f])))*Sqrt[Pi]*Erfi[(b*(I + Log[f]) + 2*x*(I*e + c*Log[f]))/(2*Sqrt[I*e + c*Log[f]])])/
Sqrt[I*e + c*Log[f]]

Rule 4472

Int[(F_)^(u_)*Sin[v_]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^u, Sin[v]^n, x], x] /; FreeQ[F, x] && (LinearQ
[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]

Rule 2287

Int[(u_.)*(F_)^(v_)*(G_)^(w_), x_Symbol] :> With[{z = v*Log[F] + w*Log[G]}, Int[u*NormalizeIntegrand[E^z, x],
x] /; BinomialQ[z, x] || (PolynomialQ[z, x] && LeQ[Exponent[z, x], 2])] /; FreeQ[{F, G}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rubi steps

\begin{align*} \int f^{a+b x+c x^2} \sin \left (a+b x+e x^2\right ) \, dx &=\int \left (\frac{1}{2} i e^{-i a-i b x-i e x^2} f^{a+b x+c x^2}-\frac{1}{2} i e^{i a+i b x+i e x^2} f^{a+b x+c x^2}\right ) \, dx\\ &=\frac{1}{2} i \int e^{-i a-i b x-i e x^2} f^{a+b x+c x^2} \, dx-\frac{1}{2} i \int e^{i a+i b x+i e x^2} f^{a+b x+c x^2} \, dx\\ &=\frac{1}{2} i \int \exp \left (-a (i-\log (f))-b x (i-\log (f))-x^2 (i e-c \log (f))\right ) \, dx-\frac{1}{2} i \int \exp \left (a (i+\log (f))+b x (i+\log (f))+x^2 (i e+c \log (f))\right ) \, dx\\ &=\frac{1}{2} \left (i \exp \left (-(i-\log (f)) \left (a-\frac{b^2 (i-\log (f))}{4 i e-4 c \log (f)}\right )\right )\right ) \int \exp \left (\frac{(-b (i-\log (f))+2 x (-i e+c \log (f)))^2}{4 (-i e+c \log (f))}\right ) \, dx-\frac{1}{2} \left (i \exp \left ((i+\log (f)) \left (a-\frac{b^2 (i+\log (f))}{4 i e+4 c \log (f)}\right )\right )\right ) \int \exp \left (\frac{(b (i+\log (f))+2 x (i e+c \log (f)))^2}{4 (i e+c \log (f))}\right ) \, dx\\ &=\frac{i \exp \left (-(i-\log (f)) \left (a-\frac{b^2 (i-\log (f))}{4 i e-4 c \log (f)}\right )\right ) \sqrt{\pi } \text{erf}\left (\frac{b (i-\log (f))+2 x (i e-c \log (f))}{2 \sqrt{i e-c \log (f)}}\right )}{4 \sqrt{i e-c \log (f)}}-\frac{i \exp \left ((i+\log (f)) \left (a-\frac{b^2 (i+\log (f))}{4 i e+4 c \log (f)}\right )\right ) \sqrt{\pi } \text{erfi}\left (\frac{b (i+\log (f))+2 x (i e+c \log (f))}{2 \sqrt{i e+c \log (f)}}\right )}{4 \sqrt{i e+c \log (f)}}\\ \end{align*}

Mathematica [A]  time = 1.8534, size = 324, normalized size = 1.52 \[ \frac{\sqrt{\pi } e^{-\frac{b^2 c \log ^3(f)}{2 \left (c^2 \log ^2(f)+e^2\right )}} f^{a-\frac{b^2}{2 (e-i c \log (f))}} \left ((\cos (a)+i \sin (a)) (e+i c \log (f)) \sqrt{c \log (f)+i e} \exp \left (\frac{1}{4} b^2 \left (\frac{\log ^2(f)}{c \log (f)-i e}+\frac{1}{c \log (f)+i e}\right )\right ) \text{Erfi}\left (\frac{-\log (f) (b+2 c x)-i (b+2 e x)}{2 \sqrt{c \log (f)+i e}}\right )-(\cos (a)-i \sin (a)) (e-i c \log (f)) \sqrt{c \log (f)-i e} f^{\frac{i b^2 c \log (f)}{c^2 \log ^2(f)+e^2}} \exp \left (\frac{1}{4} b^2 \left (\frac{\log ^2(f)}{c \log (f)+i e}+\frac{1}{c \log (f)-i e}\right )\right ) \text{Erfi}\left (\frac{\log (f) (b+2 c x)-i (b+2 e x)}{2 \sqrt{c \log (f)-i e}}\right )\right )}{4 \left (c^2 \log ^2(f)+e^2\right )} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[f^(a + b*x + c*x^2)*Sin[a + b*x + e*x^2],x]

[Out]

(f^(a - b^2/(2*(e - I*c*Log[f])))*Sqrt[Pi]*(-(E^((b^2*(((-I)*e + c*Log[f])^(-1) + Log[f]^2/(I*e + c*Log[f])))/
4)*f^((I*b^2*c*Log[f])/(e^2 + c^2*Log[f]^2))*Erfi[((-I)*(b + 2*e*x) + (b + 2*c*x)*Log[f])/(2*Sqrt[(-I)*e + c*L
og[f]])]*(e - I*c*Log[f])*Sqrt[(-I)*e + c*Log[f]]*(Cos[a] - I*Sin[a])) + E^((b^2*(Log[f]^2/((-I)*e + c*Log[f])
 + (I*e + c*Log[f])^(-1)))/4)*Erfi[((-I)*(b + 2*e*x) - (b + 2*c*x)*Log[f])/(2*Sqrt[I*e + c*Log[f]])]*(e + I*c*
Log[f])*Sqrt[I*e + c*Log[f]]*(Cos[a] + I*Sin[a])))/(4*E^((b^2*c*Log[f]^3)/(2*(e^2 + c^2*Log[f]^2)))*(e^2 + c^2
*Log[f]^2))

________________________________________________________________________________________

Maple [A]  time = 0.454, size = 218, normalized size = 1. \begin{align*}{{\frac{i}{4}}{f}^{a}\sqrt{\pi }{{\rm e}^{-{\frac{ \left ( \ln \left ( f \right ) \right ) ^{2}{b}^{2}-4\,i\ln \left ( f \right ) ac+2\,i\ln \left ( f \right ){b}^{2}+4\,ae-{b}^{2}}{4\,ie+4\,c\ln \left ( f \right ) }}}}{\it Erf} \left ( -\sqrt{-c\ln \left ( f \right ) -ie}x+{\frac{b\ln \left ( f \right ) +ib}{2}{\frac{1}{\sqrt{-c\ln \left ( f \right ) -ie}}}} \right ){\frac{1}{\sqrt{-c\ln \left ( f \right ) -ie}}}}-{{\frac{i}{4}}{f}^{a}\sqrt{\pi }{{\rm e}^{-{\frac{ \left ( \ln \left ( f \right ) \right ) ^{2}{b}^{2}+4\,i\ln \left ( f \right ) ac-2\,i\ln \left ( f \right ){b}^{2}+4\,ae-{b}^{2}}{4\,c\ln \left ( f \right ) -4\,ie}}}}{\it Erf} \left ( -\sqrt{ie-c\ln \left ( f \right ) }x+{\frac{b\ln \left ( f \right ) -ib}{2}{\frac{1}{\sqrt{ie-c\ln \left ( f \right ) }}}} \right ){\frac{1}{\sqrt{ie-c\ln \left ( f \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(f^(c*x^2+b*x+a)*sin(e*x^2+b*x+a),x)

[Out]

1/4*I*Pi^(1/2)*f^a*exp(-1/4*(ln(f)^2*b^2-4*I*ln(f)*a*c+2*I*ln(f)*b^2+4*a*e-b^2)/(I*e+c*ln(f)))/(-c*ln(f)-I*e)^
(1/2)*erf(-(-c*ln(f)-I*e)^(1/2)*x+1/2*(b*ln(f)+I*b)/(-c*ln(f)-I*e)^(1/2))-1/4*I*Pi^(1/2)*f^a*exp(-1/4*(ln(f)^2
*b^2+4*I*ln(f)*a*c-2*I*ln(f)*b^2+4*a*e-b^2)/(-I*e+c*ln(f)))/(I*e-c*ln(f))^(1/2)*erf(-(I*e-c*ln(f))^(1/2)*x+1/2
*(b*ln(f)-I*b)/(I*e-c*ln(f))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: IndexError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f^(c*x^2+b*x+a)*sin(e*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: IndexError

________________________________________________________________________________________

Fricas [B]  time = 0.558113, size = 938, normalized size = 4.4 \begin{align*} \frac{\sqrt{\pi }{\left (i \, c \log \left (f\right ) + e\right )} \sqrt{-c \log \left (f\right ) - i \, e} \operatorname{erf}\left (\frac{{\left (2 \, e^{2} x +{\left (2 \, c^{2} x + b c\right )} \log \left (f\right )^{2} + b e +{\left (i \, b c - i \, b e\right )} \log \left (f\right )\right )} \sqrt{-c \log \left (f\right ) - i \, e}}{2 \,{\left (c^{2} \log \left (f\right )^{2} + e^{2}\right )}}\right ) e^{\left (-\frac{{\left (b^{2} c - 4 \, a c^{2}\right )} \log \left (f\right )^{3} + i \, b^{2} e - 4 i \, a e^{2} -{\left (-2 i \, b^{2} c + 4 i \, a c^{2} + i \, b^{2} e\right )} \log \left (f\right )^{2} -{\left (b^{2} c - 2 \, b^{2} e + 4 \, a e^{2}\right )} \log \left (f\right )}{4 \,{\left (c^{2} \log \left (f\right )^{2} + e^{2}\right )}}\right )} + \sqrt{\pi }{\left (-i \, c \log \left (f\right ) + e\right )} \sqrt{-c \log \left (f\right ) + i \, e} \operatorname{erf}\left (\frac{{\left (2 \, e^{2} x +{\left (2 \, c^{2} x + b c\right )} \log \left (f\right )^{2} + b e +{\left (-i \, b c + i \, b e\right )} \log \left (f\right )\right )} \sqrt{-c \log \left (f\right ) + i \, e}}{2 \,{\left (c^{2} \log \left (f\right )^{2} + e^{2}\right )}}\right ) e^{\left (-\frac{{\left (b^{2} c - 4 \, a c^{2}\right )} \log \left (f\right )^{3} - i \, b^{2} e + 4 i \, a e^{2} -{\left (2 i \, b^{2} c - 4 i \, a c^{2} - i \, b^{2} e\right )} \log \left (f\right )^{2} -{\left (b^{2} c - 2 \, b^{2} e + 4 \, a e^{2}\right )} \log \left (f\right )}{4 \,{\left (c^{2} \log \left (f\right )^{2} + e^{2}\right )}}\right )}}{4 \,{\left (c^{2} \log \left (f\right )^{2} + e^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f^(c*x^2+b*x+a)*sin(e*x^2+b*x+a),x, algorithm="fricas")

[Out]

1/4*(sqrt(pi)*(I*c*log(f) + e)*sqrt(-c*log(f) - I*e)*erf(1/2*(2*e^2*x + (2*c^2*x + b*c)*log(f)^2 + b*e + (I*b*
c - I*b*e)*log(f))*sqrt(-c*log(f) - I*e)/(c^2*log(f)^2 + e^2))*e^(-1/4*((b^2*c - 4*a*c^2)*log(f)^3 + I*b^2*e -
 4*I*a*e^2 - (-2*I*b^2*c + 4*I*a*c^2 + I*b^2*e)*log(f)^2 - (b^2*c - 2*b^2*e + 4*a*e^2)*log(f))/(c^2*log(f)^2 +
 e^2)) + sqrt(pi)*(-I*c*log(f) + e)*sqrt(-c*log(f) + I*e)*erf(1/2*(2*e^2*x + (2*c^2*x + b*c)*log(f)^2 + b*e +
(-I*b*c + I*b*e)*log(f))*sqrt(-c*log(f) + I*e)/(c^2*log(f)^2 + e^2))*e^(-1/4*((b^2*c - 4*a*c^2)*log(f)^3 - I*b
^2*e + 4*I*a*e^2 - (2*I*b^2*c - 4*I*a*c^2 - I*b^2*e)*log(f)^2 - (b^2*c - 2*b^2*e + 4*a*e^2)*log(f))/(c^2*log(f
)^2 + e^2)))/(c^2*log(f)^2 + e^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int f^{a + b x + c x^{2}} \sin{\left (a + b x + e x^{2} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f**(c*x**2+b*x+a)*sin(e*x**2+b*x+a),x)

[Out]

Integral(f**(a + b*x + c*x**2)*sin(a + b*x + e*x**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int f^{c x^{2} + b x + a} \sin \left (e x^{2} + b x + a\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f^(c*x^2+b*x+a)*sin(e*x^2+b*x+a),x, algorithm="giac")

[Out]

integrate(f^(c*x^2 + b*x + a)*sin(e*x^2 + b*x + a), x)